package cn.liulin.spring_boot_study.pojo;

import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;

/**
 * cn.liulin.spring_boot_study.pojo$
 *
 * @author ll
 * @date 2021-10-22 11:49:02
 **/
@Component
//@Primary是一个修改优先权的注解,默认优先使用该类
@Primary
public class Dog implements Animal{
    @Override
    public void use() {
        System.out.println("狗【"+Dog.class.getSimpleName()+"】是看门用的。");
    }
}
